package com.dahuyou.tryy.too.parse.clazz.file.clazzfile.constantpool.item;

import com.dahuyou.tryy.too.parse.clazz.file.clazzfile.ClassReader;
import com.dahuyou.tryy.too.parse.clazz.file.clazzfile.constantpool.ConstantInfo;

public class ConstantFloatInfo implements ConstantInfo {

    private float val;

    @Override
    public void readInfo(ClassReader reader) {
        this.val = reader.readUint64TFloat();
    }

    @Override
    public int tag() {
        return this.CONSTANT_TAG_FLOAT;
    }

    public float value() {
        return this.val;
    }

    @Override
    public void showInfo() {
        System.out.println("tag 值是：" + this.tag() + ", float 值是：" + this.value());
    }
}
